package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Role;

/**
 * <b>角色管理Service接口<b><br>
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface RoleService extends LockedService {

	/**
	 * 新增角色
	 * 
	 * @param role
	 *            角色对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Parameter 新增后的对象
	 */
	public Role insert(Role role, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改角色
	 * 
	 * @param role
	 *            角色对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Role 修改后的对象
	 */
	public Role update(Role role, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 应用角色
	 * 
	 * @param role
	 *            角色对象
	 * @param appType 应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return Role 修改后的对象
	 */
	public Role updateApp(Role role,String appType, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 读取角色
	 * 
	 * @param id
	 *            角色ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Role 读取的角色对象
	 */
	public Role load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * @param ids
	 *            移动的节点ID列表
	 * @param targetID
	 *            移动到的机构节点ID
	 */
	public void move(List<String> ids, String targetID,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;
}
